'use strict';

const { Controller } = require('egg');
const { Op } = require('sequelize');
const serviceName = 'farmInfo'
class RouterController extends Controller {

  async show() {
    const { params, service } = this.ctx;
    const findItem = await service[serviceName].findOne(params.id);
    this.ctx.success(findItem);
  }
    async allList() {
        const { service } = this.ctx;
        let where = {}
        const list = await service[serviceName].allList(where);
        this.ctx.success(list);
    }
}

module.exports = RouterController;
